function [c_l,c_h]=mc(ability_metric,parameter,LowCost_Ability,HighCost_Ability)

%N=size(LowCost_Ability,1);

% Parameters that are estimated 
theta         =parameter(2);


if ability_metric==1
    c_l=1* LowCost_Ability.^(-1*theta);            % (1596 out of 2157 matches = 74%) 1. Ability proxy is pre-match winning probability (betting odds)
    c_h=1*HighCost_Ability.^(-1*theta);            % (used only for observations where pre-match odds are available for both players)
elseif ability_metric==2.5
    c_l=1* LowCost_Ability.^theta;                 % (1871 out of 2670 matches = 70%) 2.5. Ability proxy is WTA rank but more granular than 1-9->1^theta, 10-19->2^theta, etc
    c_h=1*HighCost_Ability.^theta;                 % (used only for observations where WTA ranks are available for both players)
elseif ability_metric==4
    c_l=1*exp(-1*theta* LowCost_Ability);          % (1870 out of 2670 matches = 70%) 4. Ability proxy is WTA z-score (normalized ranking points)
    c_h=1*exp(-1*theta*HighCost_Ability);          % (used only for observations where WTA ranking points are available for both players)
end


% Diagnostics (run these commands at the prompt)
%{
% Figure A.6, panel (a)
figure;
subplot(1,1,1);
scatter([HighCost_Ability*100; LowCost_Ability*100],[c_h; c_l],'black');
title('Player''s estimated marginal cost against betting-market winning probability');
ylabel('Player''s estimated marginal cost');
xlabel('Player''s betting-market winning probability (in sample, %)');

% Figure A.6, panel (c)
figure;
subplot(1,1,1);
scatter([HighCost_Ability; LowCost_Ability],[c_h; c_l],'black');
title('Player''s estimated marginal cost against WTA rank');
ylabel('Player''s estimated marginal cost');
xlabel('Player''s WTA rank (in sample)');
ylim([0 30]);
xlim([0 1000]);
%}


end